<template>
  <el-link
    :type="widget.options.type"
    :underline="widget.options.underline"
    :disabled="widget.options.disabled"
    :href="widget.options.href"
    :target="widget.options.target"
    :icon="widget.options.icon"
    @click.stop="selectField"
  >
    <slot></slot>
    {{ widget.options.linkText }}
  </el-link>
</template>

<script setup>
import {
  selectedId,
  onClickDelete,
  assignmentWidget,
} from "@/views/pageDesign/components/globalVariable";
import FieldComs from "@/views/pageDesign/components/centralRegion/index.js";
import draggableList from "@/components/draggableList";
import { Delete } from "@element-plus/icons-vue";

defineOptions({
  name: "linkWidget",
  inheritAttrs: false,
});

let $props = defineProps({
  widget: {
    type: Object,
    required: true,
  },
});

let selectField = () => {
  assignmentWidget($props.widget);
};
</script>

<style lang="scss" scoped></style>
